package indi.tshoiasc.simstr;

import indi.tshoiasc.simstr.commands.CommandStrength;
import indi.tshoiasc.simstr.config.ConfigHolder;
import indi.tshoiasc.simstr.config.ConfigLoader;
import indi.tshoiasc.simstr.listener.DamageListener;
import indi.tshoiasc.simstr.utils.VaultOperate;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;

public class SimStrengthMain extends JavaPlugin implements Listener {
	public static List<ConfigHolder> itemlist;

	public void onEnable() {
		new ConfigLoader().loadConfig(this);
		getCommand("QH").setExecutor(new CommandStrength());
		if (VaultOperate.setupEconomy()) {
			Bukkit.getConsoleSender().sendMessage("§5[ClassicStrength] §6挂接经济插件Vault成功");
		} else {
			Bukkit.getConsoleSender().sendMessage("§5[ClassicStrength] §4挂接经济插件Vault失败");
		}
		Bukkit.getConsoleSender().sendMessage("§5[ClassicStrength] §6加载成功");
		getServer().getPluginManager().registerEvents(new DamageListener(), this);
	}
}
